//
//  UserBSForgetPassword.m
//  Teacher
//
//  Created by 马腾飞 on 15/8/3.
//  Copyright (c) 2015年 xueyinyue. All rights reserved.
//

#import "UserBSForgetPassword.h"
#import "User.h"
#import "ApiConfig.h"

@implementation UserBSForgetPassword
{}

- (id)onExecute{

    NSMutableDictionary *params = [[NSMutableDictionary alloc] init];
    [params setObject:_phoneNum forKey:@"phone"];
    [params setObject:kSystemType forKey:@"systemType"];
    [params setObject:kVersionCode forKey:@"versionCode"];
    [params setObject:_InputVerificationCode forKey:@"proving"];
    [params setObject:_getVerificationCode forKey:@"code"];
    [params setObject:_password forKey:@"password"];
    
    id result = [self remoteJSON:@"POST" url:[ApiConfig urlApiUserChangePassWord] params:params];
    
    UserBSForgetPasswordResult *serviceResult = [[UserBSForgetPasswordResult alloc] init];
    
    NSNumber *returnState = result[@"error"];
    
    //成功修改密码
    if ([returnState isEqualToNumber:@0]) {
        serviceResult.isSuccess = YES;
    }
    else
    {
        serviceResult.isSuccess = NO;
        serviceResult.message = result[@"msg"];
    }
    return serviceResult;
}


@end

@implementation UserBSForgetPasswordResult{

}

@end
